﻿using System;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace SanmaoTools.Models
{
    [SugarTable("PhysicalProperties")]
    public class PhysicalProperties
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        [Required]
        public DateTime? Date { get; set; }

        [Required]
        [SugarColumn(Length = 50)]
        public string Brand { get; set; }
        /// <summary>
        /// 抗拉强度
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? TensileStrength { get; set; }
        /// <summary>
        /// 屈服强度
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? YieldStrength { get; set; }
        /// <summary>
        /// 伸长率
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? Elongation { get; set; }
        /// <summary>
        /// 硬度
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? Hardness { get; set; }
        /// <summary>
        /// 含氢量
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? HydrogenContent { get; set; }
        /// <summary>
        /// 金相
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? Metallographic { get; set; } = "合格";
        /// <summary>
        /// 断口
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string? Fracture { get; set; } = "合格";

        public DateTime? CreateTime { get; set; }
        public DateTime? UpdateTime { get; set; }
    }
}
